package org.example.tree;


/**
 * @ClassName 阻挡物类，包含一个矩形表示其边界
 * @Description TODO
 * @Author hongjun
 * @Date 2024/5/17 下午10:37
 * @Version 1.0
 */

class Block {
    enum Shape {RECTANGLE, CIRCLE}

    Shape shape;
    Rectangle bounds; // 边界矩形，用于四叉树的空间划分
    Circle circle; // 圆形阻挡物的额外信息

    public Block(Shape shape, Rectangle bounds, Circle circle) {
        this.shape = shape;
        this.bounds = bounds;
        this.circle = circle;
    }

    public Rectangle getBounds() {
        return bounds;
    }

    public void setBounds(Rectangle newBounds) {
        this.bounds = newBounds;
    }

    public Circle getCircle() {
        return circle;
    }

    public Shape getShape() {
        return shape;
    }
}
